class VarArgs {
	public static void main(String[] args) {
		printMax(1.0, 3,7,2);
		printMax(new double[] {10,30,20});
		printMax(100,300,200);
	}

	private static void printMax(double... values) {
		if(values.length==0) return;

		double max=values[0];
		for(int i=2;i<values.length; i++) {
			if(values[i] > max) {
				max=values[i];
			}
		}

		System.out.printf("%.3f\n", max);
	}
}
